from django.shortcuts import render

# Create your views here.



#主页

from App.models import Blogs

#主页
def index(request):
    b=Blogs.objects.all()

    data={
        "blogs":b
    }
    return render(request,'index.html',data)

#添加博文
def addblogs(request):
    return render(request,'addblogs.html')

#查看博文
def showblogs(request,blogId):
    return render(request,'showblogs.html')